package com.bdqn.web.controller;

import com.alibaba.fastjson.JSON;
import com.bdqn.web.entity.Comment;
import com.bdqn.web.entity.Register;
import com.bdqn.web.service.CommentService;
import com.bdqn.web.service.RegisterService;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
import org.springframework.stereotype.Controller;

import java.util.List;

@Controller
public class UserRegisterController {
    public static void main(String[] args) {
        ApplicationContext context=new ClassPathXmlApplicationContext("applicationContext.xml");
        RegisterService registerService = context.getBean("registerService", RegisterService.class);
        List<Register> registers = registerService.selectALLRegister();
        System.out.println(JSON.toJSONString(registers));
    }

}
